package com.yz.promotion.service.feign;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * <p>
 * User:Mr.Du
 * Date:2024/3/25
 * Time:19:43
 */
@Slf4j
@Component
public class PromotionUserServiceFallBackFactory implements FallbackFactory<PromotionUserFeign> {
    @Override
    public PromotionUserFeign create(Throwable cause) {
        // 记录异常日志
        log.error("Feign调用失败，原因：{}", cause.getMessage());
        return null;
    }
}
